Carbon


GetIconFromSuite

Header: Icons.h Carbon status: Supported

Gets an icon from an icon suite.

OSErr GetIconFromSuite (
    Handle *theIconData, 
    IconSuiteRef theSuite, 
    ResType theType
);
theIconData

On return, a pointer to a handle to the data for the requested icon. If an icon of the specified type does not exist in the given icon suite, this parameter is NULL.

If you intend to dispose of the handle, pass a NULL handle to the AddIconToSuite function to delete the corresponding entry in the suite.

You can use the handle returned by this function to manipulate the icon data, for example, to alter its color or add three-dimensional shading. However, you should not use the returned handle to draw the icon with other Icon Utilities functions.

To plot an icon from an icon suite, you should normally use the PlotIconSuite function. The PlotIconHandle function may not draw the icon correctly if you pass it the handle returned in this parameter.

theSuite

A handle to the icon suite from which to get the icon.

theType

The resource type of the desired icon.

function result

A result code.

SPECIAL CONSIDERATIONS

This function may move or purge memory blocks in the application heap. For that reason, your application should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)